<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>用户</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <script type="text/javascript" src='../../layui/layui.all.js'></script>
    <script type="text/javascript" src='../../jquery_v1.11.3/jquery.min.js'></script>
</head>
<body style="padding: 10px;position: relative;">
<div>
    <ul class="layui-nav">
        <li class="layui-nav-item layui-this" href="preCustomerInfo.html"><a href="#">用户</a></li>
        <li class="layui-nav-item" href="customerInfo.html"><a href="#">个人客户</a></li>
        <li class="layui-nav-item" href="companyInfo.html"><a href="#">对公客户</a></li>
    </ul>
</div>
<div id="ifdiv" style="width: 100%;height:500px;margin-top: 10px;">
    <iframe id="if" src="preCustomerInfo.html" style="width: 100%;height: 100%;border: 0px;margin-top: 10px;"></iframe>
</div>

<script>
    $(function () {
        var height = parseInt(window.innerHeight) - 100;
        $('#ifdiv').css({'height': height + 'px'});
        $('.layui-nav-item').on('click', function () {
           $('.layui-nav-item').removeClass('layui-this');
           $(this).addClass('layui-this');
           $('#if').attr('src', $(this).attr('href'));
        });
    });
</script>
</body>
</html>